<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>
<script>

    class Phone {
        price = 100;
        get price() {
            return this.price;
        }
        set price(value) {
            this.price = value
        }
        get total() {
            return this.price * 0.8;
        }
    }
    let s = new Phone();
    s.price = 80;
    console.log(s.total)

</script>

</html>